From 6fe07c57ccb4dd0e02c0102b3b2a21539a0da1ab Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild.aw" Date: Mon, 27 Feb 2006 13:16:16 -0700 Subject: [PATCH] [IA64] SMP_HOST: Alloc vhpt from domheap It's more reasonable to alloc vhpt from domheap, instead of xenheap. Signed-off-by: Anthony Xu --- xen/arch/ia64/xen/vhpt.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xen/arch/ia64/xen/vhpt.c b/xen/arch/ia64/xen/vhpt.c index 1cf305f0a1..62b272d849 100644 --- a/xen/arch/ia64/xen/vhpt.c +++ b/xen/arch/ia64/xen/vhpt.c @@ -121,7 +121,8 @@ void vhpt_multiple_insert(unsigned long vaddr, unsigned long pte, unsigned long void vhpt_init(void) { - unsigned long vhpt_total_size, vhpt_alignment, vhpt_imva; + unsigned long vhpt_total_size, vhpt_alignment; + struct page_info *page; #if !VHPT_ENABLED return; #endif @@ -134,12 +135,13 @@ void vhpt_init(void) * from domain heap when each domain is created. Assume xen buddy * allocator can provide natural aligned page by order? */ - vhpt_imva = alloc_xenheap_pages(VHPT_SIZE_LOG2 - PAGE_SHIFT); - if (!vhpt_imva) { +// vhpt_imva = alloc_xenheap_pages(VHPT_SIZE_LOG2 - PAGE_SHIFT); + page = alloc_domheap_pages(NULL, VHPT_SIZE_LOG2 - PAGE_SHIFT, 0); + if (!page) { printf("vhpt_init: can't allocate VHPT!\n"); while(1); } - vhpt_paddr = __pa(vhpt_imva); + vhpt_paddr = page_to_maddr(page); vhpt_pend = vhpt_paddr + vhpt_total_size - 1; printf("vhpt_init: vhpt paddr=%p, end=%p\n",vhpt_paddr,vhpt_pend); vhpt_pte = pte_val(pfn_pte(vhpt_paddr >> PAGE_SHIFT, PAGE_KERNEL)); -- 2.30.2